import * as echarts from "echarts";
export default {
  title: {
    text: "用户活跃度",
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "cross",
      label: {
        backgroundColor: "#6a7985",
      },
    },
  },
  legend: {
    data: ["访问量", "注册量"],
  },
  toolbox: {
    feature: {
      saveAsImage: {},
    },
  },
  grid: {
    left: "3%",
    right: "4%",
    bottom: "3%",
    containLabel: true,
  },
  xAxis: [
    {
      type: "category",
      boundaryGap: false,
      data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
    },
  ],
  yAxis: [
    {
      type: "value",
    },
  ],
  series: [
    {
      name: "注册量",
      type: "line",
      stack: "Total",
      areaStyle: {},
      emphasis: {
        focus: "series",
      },
      smooth: true,
      data: [120, 600, 101, 134, 560, 230, 210],
    },
    {
      name: "访问量",
      type: "line",
      stack: "Total",
      areaStyle: {
        opacity: 0.8,
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          {
            offset: 0,
            color: "#69E8DB",
          },
          {
            offset: 1,
            color: "#CAF8F3",
          },
        ]),
      },
      itemStyle: {
        color: "#3EE1CF",
      },
      emphasis: {
        focus: "series",
      },
      smooth: true,
      data: [220, 660, 191, 234, 700, 330, 310],
    },
  ],
};
